import {  lazy } from "react";
import Home from '../pages/home/Index'
import Login from '../pages/login/Index'
import { Navigate } from "react-router-dom";
let Index=lazy(()=>import('../pages/index/Index'))
let User =lazy(()=>import('../pages/user/Index'))
let Userr=lazy(()=>import('../pages/user/userr/Index'))
export const homee=[
    {
        path:'/home/index',
        element:<Index></Index>,
        title:'首页'
    },
    {
        path:'/home/user',
        element:<User></User>,
        title:'页面',
        children:[
            {
                path:'/home/user/userr',
                element:<Userr></Userr>,
                title:'三级路由'
            }
        ]
    }
]

const router=[
    {
        path:'/',
        element:<Navigate to={'/home/index'}></Navigate>
    },
    {
        path:'/home',
        element:<Home></Home>,
        children:homee
    },
    {
        path:'/login',
        element:<Login></Login>
    }
]
export default router









